package com.example.service;

import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

@Service
public class HazelcastServiceImpl implements HazelcastService , InitializingBean {

    private HazelcastInstance hazelcastInstance;

    @Override
    public void afterPropertiesSet() throws Exception {
        this.hazelcastInstance = Hazelcast.newHazelcastInstance();
    }

    @Override
    public HazelcastInstance getHazelcastInstance() {
        return hazelcastInstance;
    }
}
